package core;

import java.util.ArrayList;

/**
 * A class to maintain ChangeListeners.
 * @author john
 *
 */
public class ChangeTracker {
	ArrayList<ChangeListener> listeners = new ArrayList<ChangeListener>();
	
	public void registerListener(ChangeListener c) {
		listeners.add(c);
	}
	
	public void unregisterListener(ChangeListener c) {
		listeners.remove(c);
	}
	
	public void firePresentationChanged(int type) {
		for (ChangeListener c : listeners)
			c.presentationChanged(type);
	}
}
